<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='../vue.global.js'></script>
</head>

<body>
    <div id='app'></div>
    <script>
        const app = Vue.createApp({
            template: `        
            <a v-bind:[attributeName]="url">超链接</a>
            <a v-on:[eventName]="doSomething">点我</a>
        `,
            data() {
                return {
                    attributeName: "href",
                    // attributeName: "title",

                    url: "http://www.baidu.com",
                    // eventName: "click"
                    eventName: "dblclick"
                }
            },
            methods: {
                doSomething() {
                    console.log("fuck off");
                }
            }
        })
        const vm = app.mount('#app')
    </script>
</body>

</html>